package com.lk.pet.vets.controller;

import com.lk.pet.vets.model.Vet;
import com.lk.pet.vets.repository.VetRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/vets")
@RestController
@RequiredArgsConstructor
public class VetController {
    @Autowired
    private VetRepository vetRepository;

    @GetMapping
    public List<Vet> showResourcesVetList(){
        return vetRepository.findAll();
    }
}
